﻿using System;
using System.Windows.Forms;

using SBPweb.Modules.Smartparts;
using SBPweb.Modules.Modularity;

using SBPweb.MediaCenter.Tools.WF;

namespace SBPweb.MediaCenter.Presentation.WF.Controls
{
    public class DockedWindow : Control, ISmartpart
    {

        #region Private fields

        private bool pIsModal;
        private Aligning pAlign = Aligning.None;
        private IModule pParentModule;

        #endregion

        #region ISmartpart Members

        public Aligning Align
        {
            get
            {
                return pAlign;
            }
            set
            {
                pAlign = value;
                Dock = AligningConverter.AligningToDockStyle(value);
            }
        }

        public IModule ParentModule
        {
            get
            {
                return pParentModule;
            }
        }

        public bool IsVisible
        {
            get
            {
                return base.Visible;
            }
            set
            {
                base.Visible = value;
            }
        }

        public bool IsEnabled
        {
            get
            {
                return base.Enabled;
            }
            set
            {
                base.Enabled = value;
            }
        }

        public bool IsModal
        {
            get
            {
                return pIsModal;
            }
        }

        #endregion
    }
}